import request from '@/utils/request'

// 查询考勤组及人员设置列表
export function listAttend_dept_person(query) {
  return request({
    url: '/ehr/attend_dept_person/list',
    method: 'get',
    params: query
  })
}

// 查询考勤组及人员设置详细
export function getAttend_dept_person(attendanceGroupId) {
  return request({
    url: '/ehr/attend_dept_person/' + attendanceGroupId,
    method: 'get'
  })
}

// 新增考勤组及人员设置
export function addAttend_dept_person(data) {
  return request({
    url: '/ehr/attend_dept_person',
    method: 'post',
    data: data
  })
}

// 修改考勤组及人员设置
export function updateAttend_dept_person(data) {
  return request({
    url: '/ehr/attend_dept_person',
    method: 'put',
    data: data
  })
}

//删除设置考勤组的考勤机构
export function delAttend_dept(attendanceGroupId, deptId) {
  return request({
    url: '/ehr/attend_dept_person/byDept/' + attendanceGroupId + "/" + deptId,
    method: 'delete'
  })
}

// 删除设置考勤组的考勤人员
export function delAttend_person(attendanceGroupId, partyId) {
  return request({
    url: '/ehr/attend_dept_person/byPerson/' + attendanceGroupId + '/' + partyId,
    method: 'delete'
  })
}
